from selenium import webdriver
import time
from selenium.webdriver.common.by import By
web = webdriver.Chrome()
web.maximize_window()
web.get("file:///J:/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95/%E8%BD%AF%E4%BB%B6%E6%B5%8B%E8%AF%95%E5%B7%A5%E5%85%B7/%E5%8E%8B%E7%BC%A9%E5%8C%85/UI%E8%87%AA%E5%8A%A8%E5%8C%96/UI%E8%87%AA%E5%8A%A8%E5%8C%96%E5%B7%A5%E5%85%B7/web%E8%87%AA%E5%8A%A8%E5%8C%96%E5%B7%A5%E5%85%B7%E9%9B%86%E5%90%88/pagetest/%E6%B3%A8%E5%86%8CA.html")
web.find_element(By.ID,"userA").send_keys("admin")
web.find_element(By.ID,"passwordA").send_keys("12464")
web.find_element(By.ID,"telA").send_keys("45661616465456")
web.find_element(By.NAME,"emailA").send_keys("4545132@qq.com")
time.sleep(3)
web.find_element(By.ID,"telA").clear()
web.find_element(By.ID,"telA").send_keys("454565888889899988")
time.sleep(3)
web.find_element(By.XPATH,"//form/p[5]/button").click()
time.sleep(3)
print(web.find_element(By.XPATH,"//form/p[5]/button").size)
print(web.find_element(By.XPATH,"//form/p[5]/button").text)
print(web.find_element(By.XPATH,"//form/p[5]/button").get_attribute("注  册"))
web.quit()